<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<c:set var="basePath" value="${pageContext.request.contextPath}" scope="page"></c:set>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加客户基础资料</title>
 
 <script type="text/javascript">
 
	
//增加用户输入界面
	function addBasiCheck(){
		$("#dlg").dialog("open").dialog("setTitle","添加基础信息");
		url="${basePath}/addBasicCheck";
	};
	//提交保存用户
	function saveUser(){
		$("#fm").form("submit",{
			url:url,
		  	onSubmit:function(){
				return $(this).form("validate");
			},  
			success:function(result){
				if(result){
					 // $.messager.alert("系统提示","保存成功");
					resetValue();
					$("#dlg").dialog("close");
					$("#dg").datagrid("reload");
				}else{
					$.messager.alert("系统提示","保存失败");
					return;
				}
			}
		});
	};
	
	//关闭窗口
	 function closeUserDialog(){
			$("#dlg").dialog("close");
			resetValue();
		};
		 
 </script>
</head>
<!-- 动态加载后台数据 -->
<body style="margin:1px;">
	<!-- 增加客户界面 start-->
	<div id="dlg" class="easyui-dialog" style="width:620px;height:400px;padding: 10px 20px"
	  closed="true" buttons="#dlg-buttons">
	 	<form id="fm" enctype="multipart/form-data"  method="post">
	 		<table>
	 			<tr>
	 				<td>姓名：</td>
	 				<td><input type="text" name="name" class="easyui-validatebox" required="true"/>&nbsp;<font color="red">*</font></td>
	 				<td>手机：</td>
	 				<td><input type="text"  name="mobile" class="easyui-numberbox" value="1" data-options="min:1,max:200" required="true"/>&nbsp;<font color="red">*</font></td>
	 			</tr>
	 			<tr>
	 				<td>车牌号：</td>
	 				<td><input type="text"  name="platenumbers" class="easyui-validatebox"  /></td>
	 				<td>身份证：</td>
	 				<td><input type="text"  name="identification" class="easyui-validatebox"  /></td>
	 			</tr>
	 			<tr>
	 				<td>车型：</td>
	 				<td><input type="text"  name="vehicle" class="easyui-validatebox"  /></td>
	 				<td>上传人账号：</td>
	 				<td><input type="text"  name="account" class="easyui-validatebox"  /></td>
	 			</tr>
	 			<tr>
	 				<td>产品类型：</td>
	 				<td><input type="text"  name="product" class="easyui-validatebox"  /></td>
	 				<td>产品期限：</td>
	 				<td><input type="text"  name="genre" class="easyui-validatebox"  /></td>
	 			</tr>
	 			<tr>
	 			<td>征信：</td>
 				<td><input type="text"  name="credit" class="easyui-validatebox"  /></td>
	 			<td>申请表照片：</td>
	 			<td><input   type="file"   name="ima0201" data-options="prompt:'选择图片'" style="width:95%"></td>
	 			</tr>
	 			<tr>
	 			<td>行驶证1：</td>
	 			<td><input   type="file"   name="img0104" data-options="prompt:'选择图片'" style="width:95%"></td>
	 			<td>行驶证2：</td>
	 			<td><input   type="file"   name="img01P5" data-options="prompt:'选择图片'" style="width:95%"></td>
 				
	 			</tr>
	 		</table>
	 	</form>
	</div>
 
 
  	<!-- 保存客户界面 -->
	<div id="dlg-buttons">
		<a href="javascript:saveUser()" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
		<a href="javascript:closeUserDialog()" class="easyui-linkbutton" iconCls="icon-cancel">关闭</a>
	</div>
</body>
</html>